# $Id: PKGBUILD 88187 2013-04-13 14:22:25Z kkeen $
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: PepeSmith
# Contributor: Aron Asor <aronasorman at gmail.com>
# Contributor: Chris Brannon <chris@the-brannons.com>
# Contributor : Douglas Soares de Andrade <dsa@aur.archlinux.org>
 
pkgname=ipython
pkgver=0.13.2
pkgrel=1
pkgdesc="An enhanced Interactive Python shell."
arch=('any')
url="http://ipython.org"
provides=('ipython3')
replaces=('ipython3')
license=('Modified BSD')
depends=('python' 'sqlite' 'python-distribute')
optdepends=("wxpython: needed for ipythonx and ipython-wx"
            "python-nose: if you want to run IPython's test suite"
            "pyqt: for ipython-qtconsole"
            "sip: for ipython-qtconsole"
            "python-pygments: for ipython-qtconsole"
            "python-pyzmq: for ipython-qtconcole"
            "python-tornado: for ipython notebook")
source=("http://archive.ipython.org/release/$pkgver/ipython-$pkgver.tar.gz")
md5sums=('ead3b7eb70c653b537fb9d96d71b8b2a')

package() {
  cd "$srcdir/ipython-$pkgver"

  # see https://github.com/ipython/ipython/issues/2057
  #export LC_ALL=en_US.UTF-8
  python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=0
  find "$pkgdir/" -name '*.pyc' -delete
  find "$pkgdir/" -type d -empty -delete

  install -Dm644 docs/source/about/license_and_copyright.txt "$pkgdir/usr/share/licenses/ipython/LICENSE"

  cd "$pkgdir/usr/bin/"
  mv ipcluster3        ipcluster
  mv ipcontroller3     ipcontroller
  mv ipengine3         ipengine
  mv iplogger3         iplogger
  mv iptest3           iptest
  mv ipython3          ipython
  mv irunner3          irunner
  mv pycolor3          pycolor
}
